package com.hqj.demo.entity;

import org.springframework.stereotype.Component;

/**
 * Java Bean 规范
 */
@Component
public class Student {

    private String loginName;
    private String password;
    private String sex;
    private Integer age;

    public Student() {}

    public Student(String loginName, String password, String sex, Integer age) {
        this.loginName = loginName;
        this.password = password;
        this.sex = sex;
        this.age = age;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "loginName='" + loginName + '\'' +
                ", password='" + password + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }
}
